/**
 * Created by John on 2016/7/15.
 */
var doc1 = {name: 'Fred'};
myColl.insert(doc1, function (err, items) {
    // ...
});

var doc2 = {name: 'George'};
var doc3 = {name: 'Ron'};
myColl.batchInsert([doc2, doc3], function (err, items) {
    // ...
});

collection.remove(function (err, items) {
    // ...
});

var query = {first: 'a'};
collection.remove(query, function (err, items) {
    // ...
});

query = {category: 'New'};
var update = {$set: {category: 'Old'}};
var options = {upsert: false, multi: true};
myColl.update(query, update, options, function (err, items) {
    // ...
});

qeury = {name: 'myDoc'};
var set = {name: 'myDoc', number: 5, score: 10};
update = {$set: set};
options = {upsert: true, multi: false};
update(query, update, options, function (err, items) {
    // ...
});